package com.homework.search.service;

import com.homework.search.dto.PostDTO;
import com.homework.search.dto.PostMqIndexMessage;
import com.homework.search.model.PostDocument;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface SearchService {

    Page<PostDocument> query(Pageable pageable, String keyword);

    void removeIndex(PostMqIndexMessage message);

    void createOrUpdateIndex(PostMqIndexMessage message);

    int initEsIndex(List<PostDTO> data);
}
